/**
 * @description 自动import导入所有 vuex 模块
 */

import { createStore } from 'vuex';

const files = import.meta.globEager('./modules/*.js');
const modules = {}

for (const key of Object.keys(files)) {
	let res =  files[key];
	let s = key.replace(/(\.\/|\.js)/g, '');
	let mk = s.replace("modules/", "");
	modules[mk] = res.default
}

export default createStore({
	modules
});
